// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import Character from "../../BASE/Character";
import turn from "../../game/time/turn";
import GeZiManager from "../../Manager/GeZiManager";

import BXX from "./BXX";

const {ccclass, property} = cc._decorator;

@ccclass
export default class B04 extends BXX {
    target:Character=null;
    TheNumber:string = 'B04';
    Cname:string="鬼王的新衣"
    N:number=0

    start () {
        this.target=this.node.getComponent(Character);

        this.target.Mjia(-1)
        this.target.DZD=false;
        this.target.gui=true
        this.target.mk-=1;
        this.target.wk+=99;
       // this.target.ghost=true
       turn.Roo.push(this)
    }

 roundPass(): void {
   if (turn.DorN=="day") {
  this.remove()
       
   }



 }

remove(){
    this.target.Mjia(+1)
if (   this.target.DZD) {
    this.target.DZD=true;
}
//this.target.ghost=false
        this.target.mk+=1;
        this.target.gui=false
        this.target.wk-=99;
GeZiManager.shanchu(turn.Roo,this)
    }



}

